<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        <input type="text" id="addStudentsName"> 姓名
        <input type="text" id='addStudentsAge'> 账号
        <input type="text" id="selectClasses"> 密码
        <button id="addStudentsBtn">确认新增</button>
        <button>删除</button>
        <button>修改</button>
    </div>
    <script src="./jquery.min.js"></script>
    <script>
        $('#addStudentsBtn').click(function () {
            const name = $('#addStudentsName').val();
            const account = $('#addStudentsAge').val();
            const password = $('#selectClasses').val();
            $.ajax({
                url: '/salesmans/addSalesmans',
                type: 'post',
                data: {
                    name,
                    account,
                    password,

                },
                success(data) {
                    if (data.status) {
                        alert('新增成功');

                    }
                }
            })
        })
    </script>
</body>

</html>